package com.auxteam.elope;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

import com.auxteam.elope.activities.DynamicBaseActivity;
import com.auxteam.elope.fragments.ColorFragment;
import com.auxteam.elope.menus.DynamicMenuList;
import com.auxteam.elope.menus.SampleAdapter;
import com.auxteam.elope.menus.SampleItem;
import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;

public class UserHomeScreen extends DynamicBaseActivity{

	Intent i;
	String username;
	public UserHomeScreen() {
		super(R.string.app_name);
	}
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getSlidingMenu().setMode(SlidingMenu.LEFT);
		getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
		
		i = this.getIntent();
		username = i.getStringExtra("username");
		
		Toast.makeText(getApplicationContext(), "Welcome " + username, Toast.LENGTH_LONG).show();
		menuList.adapter = new SampleAdapter(getApplicationContext());
		menuList.adapter.add(new SampleItem("Search", R.drawable.screwdriver));
		menuList.adapter.add(new SampleItem("Search", 0));
		menuList.adapter.add(new SampleItem("Log In", 0));
		menuList.adapter.add(new SampleItem("Shop", 0));
		menuList.adapter.add(new SampleItem("Player", 0));
		menuList.adapter.add(new SampleItem("Settings", 0));
		menuList.adapter.add(new SampleItem("Exit", 0));
		
		menuList.setListAdapter(menuList.adapter);
		setContentView(R.layout.content_frame);
		getSupportFragmentManager()
		.beginTransaction()
		.replace(R.id.content_frame, new ColorFragment())
		.commit();
		
	}
	
}
